package com.jdbcUtil;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class ResultsetUtil {

	ResultSet rs = null;
	
	public ResultSet getResult(Statement sm,String sql) throws SQLException{
		rs=sm.executeQuery(sql);
		return rs;
	}
	
	public ResultSet getResult(PreparedStatement psm) throws SQLException{
	    rs = psm.executeQuery();
		return rs;
	}
	
	public void close() throws SQLException{
		rs.close();
	}
	
}
